package com.jiyun.service;

import com.jiyun.dao.IndexMapper;
import com.jiyun.pojo.Sbindex;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class IndexService {

    @Autowired
    IndexMapper indexMapper;

    public List<Sbindex> findAll(){
        return  indexMapper.selectAll();
    }

    public void insertSbindex(Sbindex sbindex){
        indexMapper.insert(sbindex);
    }
    public void delSbindex(int id){
        indexMapper.deleteByPrimaryKey(id);
    }

    public void updateSbindex(Sbindex sbindex){
        indexMapper.updateByPrimaryKeySelective(sbindex);
    }



}
